import turtle

# 设置画布
screen = turtle.Screen()
screen.setup(width=600, height=600)
screen.bgcolor("white")
screen.tracer(0)

# 初始化 turtle
nezha = turtle.Turtle()
nezha.speed(0)
nezha.pensize(3)

# 哪吒头
nezha.penup()
nezha.goto(0, 50)
nezha.pendown()
nezha.circle(50)

# 哪吒身体
nezha.penup()
nezha.goto(0, 0)
nezha.pendown()
nezha.circle(80)

# 火尖枪杆
nezha.penup()
nezha.goto(30, 130)
nezha.pendown()
nezha.setheading(70)
nezha.forward(100)

# 火尖枪头
nezha.penup()
nezha.goto(nezha.xcor(), nezha.ycor())
nezha.pendown()
nezha.begin_fill()
nezha.forward(20)
nezha.right(120)
nezha.forward(20)
nezha.right(120)
nezha.forward(20)
nezha.end_fill()

# 风火轮 1
nezha.penup()
nezha.goto(-60, -80)
nezha.pendown()
nezha.circle(20)

# 风火轮 2
nezha.penup()
nezha.goto(60, -80)
nezha.pendown()
nezha.circle(20)

# 混天绫 1
nezha.penup()
nezha.goto(-80, 50)
nezha.pendown()
nezha.pencolor("red")
nezha.setheading(20)
nezha.circle(60, 180)

# 混天绫 2
nezha.penup()
nezha.goto(80, 50)
nezha.pendown()
nezha.setheading(160)
nezha.circle(60, 180)
nezha.pencolor("black")

nezha.hideturtle()
screen.update()
turtle.done()
